package yxxy.c_02;

/**
 * synchronized关键字
 * 对某个对象加锁
 * @author mashibing
 */

public class T {
    private int count = 10;

    public void m(){
        synchronized (this){
            count--;
            System.out.println(Thread.currentThread().getName()+ "count = "+count);
        }
    }
}
